   /**
    * Cao Hong Hiep
    * 13.06.2011
    */
   function createContent(_real, _predictive, _target,_label){
   		MAX_PIXEL_OF_CHART = 400;
   		
   		content = document.createElement('div'); 
		content.id= 'content';

		size = -max([-_real.length,-_predictive.length,-_target.length,-_label.length]);
		
		content.style.width = size*(180+2)+"px";

		maxValue = max([max(_real),max(_predictive),max(_target)]);
		if(maxValue%10 !=0){
			maxValue = maxValue - (maxValue%10) + 10;
		}		
		
		for (var i=0; i < size; i++) {
			
			r=(_real[i]/maxValue)*MAX_PIXEL_OF_CHART;
			p=(_predictive[i]/maxValue)*MAX_PIXEL_OF_CHART;
			t=(_target[i]/maxValue)*MAX_PIXEL_OF_CHART;
			
			content.appendChild(createGroupChart(r,p,t,_label[i]));
		};
		
		scrollChart = document.getElementById('scrollChart');
		scrollChart.appendChild(content);
		//document.body.appendChild(content);
   }
   function createGroupChart(height1,height2,height3, label){

		var group = document.createElement('div');
		group.id='group';
		group.className='group';
		
		labelGroup = createLabelGroup(label);
		group.appendChild(labelGroup);
		
		for (var i=0; i <= 4; i++) {
			net = document.createElement('div');
			net.id='net';
			net.className='net';
			net.style.bottom= i*20+"%";
			group.appendChild(net)
			
		};
		
		bar1 = createBar1(height1);
		bar2 = createBar2(height2);
		bar3 = createBar3(height3);
		
		group.appendChild(bar1);
		group.appendChild(bar2);
		group.appendChild(bar3);
		
		
		return group;
   }
   
   function createBar1(height){
   		bar1 = document.createElement('div');
		bar1.id='bar1';
		bar1.className='bar1';
		bar1.style.height=height +'px';
		label = createLabelBar('a b c');
		bar1.appendChild(label);
		return bar1;
   }
   
   function createBar2(height){
   		bar2 = document.createElement('div');
		bar2.id='bar2';
		bar2.className='bar2';
		bar2.style.height=height +'px';
		label = createLabelBar('d e f');
		bar2.appendChild(label);
		return bar2;
   }
   
   function createBar3(height){
   		bar3 = document.createElement('div');
		bar3.id='bar3';
		bar3.className='bar3';
		bar3.style.height=height +'px';
		label = createLabelBar('g h k');
		bar3.appendChild(label);
		return bar3;
   }
   
    function createLabelBar(title){
   		labelBar = document.createElement('div');
		labelBar.id='labelBar';
		labelBar.className='labelBar';
		labelBar.innerHTML = title;
		return labelBar;
   }
   
   function createLabelGroup(title){
   		labelGroup = document.createElement('div');
		labelGroup.id='labelGroup';
		labelGroup.className='labelGroup';
		labelGroup.innerHTML = title;
		return labelGroup;
   }
   function max(num){   	
	   	_max = num[0];
	   	for (var i=1; i < num.length; i++) {
			if(num[i]>_max){
				_max=num[i];
			}
		};
	   	return _max;
   }